package com.freesky.provider.zuul.fallback;

import org.springframework.cloud.netflix.zuul.filters.route.ZuulFallbackProvider;
import org.springframework.http.client.ClientHttpResponse;
import org.springframework.stereotype.Component;

/**
 * @author: 陈玉林
 * @modifiedBy:
 * @date: Create In 9:20 2018/12/10
 * @description: emal-provider-content降级服务
 */
@Component
public class ProviderContentFallback implements ZuulFallbackProvider {
    private String routeName = "emall-provider-content";
    @Override
    public String getRoute() {
        return routeName;
    }

    @Override
    public ClientHttpResponse fallbackResponse() {
        return new MyClientHttpResponse(routeName);
    }
}
